<template>
  <div class="a">
    <mt-swipe :auto="4000">
      <mt-swipe-item v-for="item in list" :key="item.id">
        <img :src="item.img_url" alt>
        {{item.img_url}}
      </mt-swipe-item>
    </mt-swipe>
  </div>
</template>

<script>
export default {
  created() {
    this.getlist();
  },
  data() {
    return {
      list: []
    };
  },
  methods: {
    async getlist() {
      const { data: dt } = await this.$http.get("/api/getnewslist");
      console.log(dt);
      this.list = dt.message;
    }
  }
};
</script>

<style lang="less" scoped>
.a {
  height: 200px;
  // background-color: red;
}
img {
  width: 100%;
  height: 100%;
}
</style>
